<?php

namespace app\queue\stomp;

use think\Hook;
use Webman\Stomp\Client;
use app\queue\BaseConsumer;
use common\model\TaskModel;
use common\model\UserModel;
use common\model\ProjectModel;
use common\service\TaskService;
use common\service\UserService;
use common\service\ChatService;
use common\service\OrderService;
use common\service\OptionsService;
use common\model\ProjectMemberModel;
use common\service\TaskUpstreamService;

/**
 * 任务废除/启用 发送小助手消息
 */
class TaskCloseOperateSendMessageConsumer extends BaseConsumer
{

    // 要消费的队列名
    public $queue = 'task_close_operate_async_send_producer_message';

    // 连接名，对应 config/redis_queue.php 里的连接`
    public $connection = 'default';


    /**
     * @param $data
     * @return void
     */
    public function doConsume($data)
    {
        $hookData = [
            'type' => 'task_status_change',
            'data' => $data,
        ];
        Hook::listen('task_status_change_after', $hookData);
    }
}
